package com.partterns.factory;

/**
 * 测试简单工厂模式
 */
public class ShapeFactoryTest {
    public static void main(String[] args){
        ShapeFactory shapeFactory=new ShapeFactory();
        Shape shape1=shapeFactory.getShape("RECTANGLE");
        Shape shape2=shapeFactory.getShape("SQUARE");
        Shape shape3=shapeFactory.getShape("CIRCLE");
        shape1.draw();
        shape2.draw();
        shape3.draw();
    }
}
